package com.Shuang.Demo5;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {
    public static final String FILE_PATH = "ExamFinal\\src\\UserLoginInfo.properties";
    public static void main(String[] args) {
        try {
            //创捷服务端并同时注册端口
            ServerSocket serverSocket= new ServerSocket(1003);
            while (true) {
                //创建管道等待客户端的连接
                Socket socket = serverSocket.accept();
                //连接上客户端，交给线程处理
                new ServerReaderThread(socket).start();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
